<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }


        .nav-colorful ul {
            list-style: none;
            display: flex;
            flex-direction: row;


        }


        .nav-colorful a {
            width: 128px;
            height: 60px;
            display: inline-block;
            text-decoration: none;
            color: #fff;
            text-align: center;
            line-height: 50px;
            font-size: 18px;
            transition: all 0.3s ease;
            margin: 0;
            padding: 0;
        }


        .nav-colorful li:first-child a {
            background-image: url(./images/bg1.png);
            background-repeat: no-repeat;
        }

        .nav-colorful li:nth-child(2) a {
            background-image: url(./images/bg2.png);
            background-repeat: no-repeat;
        }


        .nav-colorful li:nth-child(3) a {
            background-image: url(./images/bg3.png);
            background-repeat: no-repeat;
        }


        .nav-colorful li:last-child a {
            background-image: url(./images/bg4.png);
            background-repeat: no-repeat;
        }

        .nav-colorful li:first-child a:hover {
            background-image: url(./images/bg5.png);
            background-repeat: no-repeat;
        }

        .nav-colorful li:nth-child(2) a:hover {
            background-image: url(./images/bg6.png);
            background-repeat: no-repeat;
        }

        .nav-colorful li:nth-child(3) a:hover {
            background-image: url(./images/bg7.png);
            background-repeat: no-repeat;
        }

        .nav-colorful li:last-child a:hover {
            background-image: url(./images/bg8.png);
            background-repeat: no-repeat;
        }
    </style>
</head>

<body>
    <div class="nav-colorful">
        <ul>
            <li><a href="#">五彩导航</a></li>
            <li><a href="#">五彩导航</a></li>
            <li><a href="#">五彩导航</a></li>
            <li><a href="#">五彩导航</a></li>
        </ul>
    </div>

</body>

</html>